﻿namespace T4UtilityBelt.DataDesigns.LightSwitch
{
    public class LightSwitchEntity : Entity
    {
        public LightSwitchEntity()
        {
            StandardConstructor();
        }

        public LightSwitchEntity(string name, string pluralName)
            : base(name, pluralName)
        {
            StandardConstructor();
        }

        private void StandardConstructor()
        {
            Properties.Add(new KeyProperty("Id")
                {
                    DefaultString = "Guid.NewGuid()",
                    SecondaryDefaultString = "Guid.NewGuid().ToString()",
                    ShouldSerialize = false
                });
            Properties.Add(new DateTimeProperty("Created", true) {DefaultString = "DateTime.Now", ShouldSerialize = false});
            Properties.Add(new StringProperty("CreatedBy") {MaxLength = 32, ShouldSerialize = false});
            Properties.Add(new DateTimeProperty("Modified", true) {DefaultString = "DateTime.Now", ShouldSerialize = false});
            Properties.Add(new StringProperty("ModifiedBy") {MaxLength = 32, ShouldSerialize = false});
        }
    }
}